varying vec4 var_vec4_position;
varying vec2 var_vec2_texcoord0;
varying vec3 var_vec3_normal;
uniform vec4 uni_vec4_diffuse;
uniform vec3 uni_vec4_specular;

void main()
{
    vec3 pos=var_vec4_position.xyz;
	vec3 nor=normalize(var_vec3_normal);
	
    vec3 lightPos=vec3(0,0,0);
    vec3 lightDir=normalize(lightPos-pos);
	float iDiff=max(0.0,dot(nor,lightDir));
    if (iDiff > 0.95)  
	    iDiff=1.0;
	else if (iDiff > 0.5)  
        iDiff=0.5;
    else if (iDiff > 0.25)  
        iDiff=0.25;  
    else  
        iDiff=0;  
	
	gl_FragColor=uni_vec4_diffuse*iDiff;
}